Skip to content

[CU-1k5fpda9909] Add omics workbench users unregister - #200

Merged
Kevin-DNA merged 1 commit into
mainfrom
unregister-user-CU-1k5fpda9909
Nov 26, 2026
Merged

Kevin-DNA merged 1 commit into
mainfrom
unregister-user-CU-1k5fpda9909

Conversation

@Kevin-DNA

Copy link
Copy Markdown
Contributor

Summary

Adds omics workbench users unregister --email EMAIL [--force|-f], the counterpart to users register, so platform engineers no longer hand-write a DELETE /users/{email} request. The command validates and lowercases the email, then asks for confirmation unless --force is given, because unregistering deletes any namespace where the user is the last ADMIN. It then sends the DELETE and prints User <email> unregistered. Non-2xx responses, including a 502 partial failure, exit 1 through the existing HTTP <status>: <body> path. Without --force, a non-interactive run aborts at the prompt with exit 1.

Decisions

  • The CLI lowercases the email rather than relying on the server. The user service stores emails lowercased at registration but passes the raw value to Wallet on unregister, and Wallet matches role members case-sensitively.

How to test

Run live on prod with this branch: register a throwaway user, then run echo y | omics workbench users unregister --email 'KShong831+WBtest@gmail.com'. It prints User kshong831+wbtest@gmail.com unregistered. Afterwards, users describe and the user's personal namespace both return 404.

ClickUp: https://app.clickup.com/t/1k5fpda9909

🤖 Generated with Claude Code

https://claude.ai/code/session_011GSYqHzxEFFeYzuvnpcg1T

Platform engineers can now unregister a Workbench user from the omics CLI
instead of hand-writing DELETE calls to the user service, which removes the
last reason to keep wbctl.

The email is lowercased before it is sent, matching how register stores it
and how wbctl unregistered users: the user service passes the raw value on to
Wallet, which matches role members case-sensitively, so a mixed-case value
could otherwise leave the user's platform membership behind.

Unregistering deletes any namespace where the user is the last ADMIN, so the
command asks for confirmation unless --force is given, like the other
destructive commands.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011GSYqHzxEFFeYzuvnpcg1T
@platform-automation-dnastack

Copy link
Copy Markdown

@github-actions

Copy link
Copy Markdown

☂️ Python Coverage

current status: ✅

Overall Coverage

Lines Covered Coverage Threshold Status
12601 8388 67% 30% 🟢

New Files

No new covered files...

Modified Files

File Coverage Status
dnastack/cli/commands/workbench/users/commands.py 100% 🟢
dnastack/client/workbench/workbench_user_service/client.py 57% 🟢
TOTAL 78% 🟢

updated for commit: e2145d3 by action🐍

1 similar comment
@github-actions

Copy link
Copy Markdown

☂️ Python Coverage

current status: ✅

Overall Coverage

Lines Covered Coverage Threshold Status
12601 8388 67% 30% 🟢

New Files

No new covered files...

Modified Files

File Coverage Status
dnastack/cli/commands/workbench/users/commands.py 100% 🟢
dnastack/client/workbench/workbench_user_service/client.py 57% 🟢
TOTAL 78% 🟢

updated for commit: e2145d3 by action🐍

@Kevin-DNA
Kevin-DNA merged commit f3a59b5 into main Nov 26, 2026
6 checks passed
@Kevin-DNA
Kevin-DNA deleted the unregister-user-CU-1k5fpda9909 branch November 26, 2026 13:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants